<template>
  <div>
    <h2>Home</h2>
  </div>
</template>
<script setup>

import { onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router';

onBeforeRouteUpdate((to, from, next) => {
  console.log('home onBeforeRouteUpdate');
  next();
});
onBeforeRouteLeave((to, from, next) => {
  console.log('home onBeforeRouteLeave');
  next();
})

</script>